<!-- 数字地图-轨迹查看-离线数据 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>

          <el-col :span="6">
            <el-form-item label="学校名称">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="研学课程">
              <el-select v-model="flevelname" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          

          <template v-if="showAll">
          
            <el-col :span="6">
            <el-form-item label="班级名称">
              <el-select v-model="flevelname" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="学生姓名">
              <el-input v-model="listQuery.fuser" placeholder="请输入ID或姓名" clearable />
            </el-form-item>
          </el-col>
          
        </template>

          <el-col :span="6">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" >查询</el-button>
              <el-button type="success" icon="el-icon-download">导出</el-button>
              <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">展开</el-button>
              <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
                收起</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>

      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FSCHOOL" label="学校名称" ></el-table-column>
          <el-table-column prop="FCATNAME" label="研学课程" ></el-table-column>
          <el-table-column prop="FCLASS" label="班级" width="95"></el-table-column>
          <el-table-column prop="FUSER" label="学生姓名" width="85"></el-table-column>        
          <el-table-column prop="F01" label="经度" width="95"></el-table-column>
          <el-table-column prop="F02" label="纬度" width="95"></el-table-column>
          <el-table-column prop="FMEMO" label="上报地点" ></el-table-column>
          <el-table-column prop="FENDTIME" label="最后时间"  width="95"></el-table-column>
          <!-- <el-table-column fixed="left" label="操作" align="center" width="95">
            <template slot-scope="scope">
              <el-button type="text" @click="insert(scope.row.FBILLNO)" size="small" icon="el-icon-edit">
                查看
              </el-button>
            </template>
          </el-table-column> -->
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"/>
      </div>
    </div>
  </div>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    name: 'shop',
    components: {  },
    data() {
      return {
        showAll: false,
        flevelname:"2025上海博物馆研学",

        //所属教学楼选择数据
        options1: [{
          value: '20E01',
          label: '闵行春申小学'
        }, {
          value: '20E02',
          label: '闵行莘城中学'
        }, {
          value: '20N01',
          label: '闵行莘松中学'
        }, {
          value: '20N02',
          label: '闵行莘庄中学'
        }],

        //所属楼层选择数据
        options2: [{
          value: '20E01',
          label: '一楼'
        }, {
          value: '20E02',
          label: '二楼'
        }, {
          value: '20N01',
          label: '三楼'
        }, {
          value: '20N02',
          label: '四楼'
        }],
        
        customlist:[
          {
            "FBILLNO":"",
            "FBILLCREDATE":"2024-11-03",
            "FHOME":"化学与材料科学学院",
            "FUSER":"曹操",
            "FCATNAME":"医疗垃圾智慧处理系统",
            "FTEACH":"秦始皇",
            "FWEEK":"3个月",
            "FBEGDATE":"2025-02-01",
            "FENDDATE":"2025-04-30",
            "FMONEY":"10万",
            "FBILLSTATE":"申请中"
          },
        ],
        list: [
            {
            "FBILLNO": "Y241130001", 
            "FBILLCREDATE":"2024-11-29",
            "FUSER": "关平",
            "FSCHOOL": "闵行春申小学",
            "FCATNAME": "2025上海博物馆研学",
            "FBEGDATE": "2025-03-15",
            "FENDDATE":"2025-03-15",
            "FCLASS":"一年级",
            "F01":"121.47004",
            "F02":"32.23136",
            "FMEMO":"上海全家人民广场店",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FCATNO":"100009",
            "FTIME":"2024-12-03 19:12:03",
            "FNOTE":"超出电子围栏",
            "FBILLTYPE":"教学申请",
            "FBILLSTATE": "申请中",
            "FENDTIME":"10:23:21"
            },{
            "FBILLNO": "Y241130002", 
            "FBILLCREDATE":"2024-12-13",
            "FUSER": "张苞",
            "FSCHOOL": "闵行春申小学",
            "FCATNAME": "2025上海博物馆研学",
            "FBEGDATE": "2025-03-15",
            "FENDDATE":"2025-03-16",
            "FCLASS":"一年级",
            "F01":"121.47004",
            "F02":"32.23136",
            "FMEMO":"上海全家人民广场店",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FCATNO":"100029",
            "FTIME":"2024-12-03 19:12:03",
            "FNOTE":"超出电子围栏",
            "FBILLTYPE":"教学申请",
            "FBILLSTATE": "申请中",
            "FENDTIME":"10:23:21"
            }
        ],
        fbillcredate: [jnpf.dateFormat(new Date(), "YYYY-MM-DD"), jnpf.dateFormat(new Date(), "YYYY-MM-DD")],
        loading: false,
        total: 0,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fbillstate: "",
          fbillno: "",
          begindate: undefined,
          enddate: undefined,
          fcustomno: "闵行春申小学"
        },
      };
    },
    computed: {},
    methods: {
      insert(id) {
        this.$refs.Form.init(id);
      },
    },
  };
</script>